package com.atguigu.gmall.feign.seckill;

import com.atguigu.gmall.common.result.Result;
import com.atguigu.gmall.order.entity.OrderInfo;
import com.atguigu.gmall.seckill.entity.SeckillGoods;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

/**
 * @Description
 * @Return
 * @Author https://weiranyi.github.io
 * @Date Created in 2022-12-26 10:00
 **/
@RequestMapping("/api/inner/rpc/seckill")
@FeignClient("service-seckill")
public interface SeckillFeignCilent {
    @GetMapping("/today/goods")
    public Result<List<SeckillGoods>> getTodaySeckillGoods();
    @GetMapping("/goods/detail/{skuId}")
    public Result<SeckillGoods> getSeckillGoodsDetails(@PathVariable("skuId") Long skuId);
    @GetMapping("/order/{skuId}")
    public Result<OrderInfo> seckillOrderInfo(@PathVariable("skuId") Long skuId);
}
